﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace CommonExceptioin
{
    /// <summary>
    /// 自定义异常
    /// </summary>
    [Serializable]
    public sealed class CoreException : Exception
    {
        private readonly string _localMessage;

        public CoreException(string localmessage, Exception e)
            : base(localmessage, e)
        { }
        public CoreException(string localmessage)
            : this(localmessage, null)
        {
            _localMessage = localmessage;
        }
        protected CoreException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }

        public string LocalMessage { get { return _localMessage; } }
    }
}
